<template>
  <div class="body">
    <my-header></my-header>
    <h2>新闻编辑界面</h2>
    <quill-editor ref="text" v-model="content" class="editor" :options="editorOption"/>
    <el-button class="button" @click="onEditor">提交</el-button>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        content: "",
        editorOption: {},
      };
    },
    methods: {
      onEditor() {
        alert("文本内容="+this.$refs.text.value);
        console.log("文本内容="+this.$refs.text.value);
      },
    },
  };
</script>

<style  scoped>
  .body {
    height: 700px;
    .editor {
      height: 500px;
    }
    .button {
      margin-left: 50%;
      margin-top: 50px;
    }
  }
</style>
